package com.thor.palmmall.dao.banlancebill;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.balancebill.BanlanceBillDetail;

public class BanlanceBillDetailConvert implements Converter<PBanlanceBillDetail,BanlanceBillDetail>{

  @Override
  public BanlanceBillDetail convert(PBanlanceBillDetail source) {
    if (source == null){
      return null;
    }
    BanlanceBillDetail target = new BanlanceBillDetail();
    target.inject(source);
    target.setBillNo(source.getBillNo());
    target.setSubject(source.getSubject());
    target.setBeginDate(source.getBeginDate());
    target.setEndDate(source.getEndDate());
    target.setPayTotal(source.getPayTotal());
    target.setPayedTotal(source.getPayedTotal());
    target.setUnpayedTotal(source.getUnpayedTotal());
    target.setConfirmed(source.getConfirmed());
    target.setAccId(source.getAccId());
    return target;
  }

}
